let arr = [1, 2, 3, 4, 5];
let result = Array.from(arr);
console.log(result); // [1, 2, 3, 4, 5]
let str = "asdfghj";
result = Array.from(str);
console.log(result); // ['a', 's', 'd', 'f', 'g', 'h', 'j']
let map = new Map([[1, 2], [3, 4], [5, 6]]);
result = Array.from(map);
console.log(result);
/**结果
[
  [ 1, 2 ],
  [ 3, 4 ],
  [ 5, 6 ]
]
*/
const set = new Set(['foo', 'bar', 'baz', 'foo']);
result = Array.from(set);
console.log(result); // ['foo', 'bar', 'baz']
